Leaving unnecessary files in Docker image increases its size. The Docker images should be small and only contain necessary data. The cache index is
obsolete after installation.
Exceptions
The rule does not raise when the update is followed by a gdebi
package installation, as it can still install required dependencies
when installing from a file, which would require the apt
cache to be updated.